package com.ck.jdk8.stream.controller;

import com.ck.jdk8.stream.domain.EsProduct;
import com.ck.jdk8.stream.service.StreamService;
import com.ck.jdk8.util.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Classname StreamController
 * @Description Stream控制器
 * @Date 2020/5/28 17:40
 * @Created by lpc
 */
@RestController
@Api(tags = "StreamController", description = "测试管理")
@RequestMapping("/stream")
public class StreamController {

    @Autowired
    private StreamService streamService;

    @ApiOperation(value = "商品查看功能")
    @GetMapping(value = "/select")
    public Object select() {
        List<EsProduct> esProductList = streamService.select();
        return new JsonResult().success(esProductList);
    }

}
